#pragma once

namespace MOE
{
	namespace Core
	{
		class ClassMeta;
	}

	namespace System
	{

		// Defines some common functions that can be used by inherited classes for MetaObject operations.
		class MetaObjectHeader
		{
		public:
			// Constructor. Must be constructed with a class meta.
			explicit MetaObjectHeader(const Core::ClassMeta& classMeta);

			// Intended to be inherited.
			virtual ~MetaObjectHeader();

			// Get the class meta.
			const Core::ClassMeta& GetClassMeta() const { return mClassMeta; }

			// Query if my class meta is either the same as the other class meta, or an inherited subclass of it.
			bool IsOfType(const Core::ClassMeta& otherMeta) const;

			// Query if my class meta is exactly the same as the other class meta.
			bool IsOfExactType(const Core::ClassMeta& otherMeta) const { return &mClassMeta == &otherMeta; }

		private:
			const Core::ClassMeta& mClassMeta;
		};

	}
}
